$(function(){
	 $('.selecttr').on('click', function() {
		var strdata="";
		strdata+="<tr class='selectedtr' onclick='showData(this);'><td>"+this.children[0].innerHTML+"</td><td>"+this.children[1].innerHTML+"</td>" +
				"<td>"+this.children[2].innerHTML+"</td><td>"+this.children[3].innerHTML+"</td>" +
				"<td>"+this.children[4].innerHTML+"</td><td style='display:none;'>"+this.children[5].innerHTML+"</td></tr>";
		parent.$("#tb_data").append(strdata);
        var parentElement = this.parentNode;
        if(parentElement){
               parentElement.removeChild(this);
        }
	 });
});

function showselData(e) {
	 var strdata="";
	 strdata+="<tr class='selecttr' onclick='showData(this);'><td>"+e.children[0].innerHTML+"</td><td>"+e.children[1].innerHTML+"</td>" +
			"<td>"+e.children[2].innerHTML+"</td><td>"+e.children[3].innerHTML+"</td>" +
			"<td>"+e.children[4].innerHTML+"</td><td style='display:none;'>"+e.children[5].innerHTML+"</td></tr>";
	 parent.$("#tb_data").append(strdata);
     var parentElement = e.parentNode;
     if(parentElement){
            parentElement.removeChild(e);
     }
}
